﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Xml.Linq;
using iShoppingBUS;
using iShoppingDTO;

namespace iShopping.Guest
{
    public partial class KetQuaTimKiem : System.Web.UI.Page
    {
        protected void Page_PreInit(object sender, EventArgs e)
        {
            GiaoDienDTO giaoDienDto = GiaoDienBUS.SelectGiaoDienMa("Theme001");
            if (giaoDienDto != null)
            {
                this.Theme = giaoDienDto.TenTheme;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (IsPostBack == false)
            {
                TextBox textBox = (TextBox)Master.FindControl("TextBox1");
                textBox.Text = Request.QueryString["name"];
                string value = Request.QueryString["id"].ToString();
                DropDownList dropDownList = (DropDownList)Master.FindControl("dllist");
                //int temp = 0;
                for (int i = 0; i < dropDownList.Items.Count; i++)
                {
                    if (dropDownList.Items[i].Value == value)
                    {
                        dropDownList.SelectedIndex = i;
                        break;
                    }
                }
            }


        }
    }
}
